package com.unknowpupil.design.mediator;

/**
 * @Description: <p>
 *  开发部
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/28 14:06
 * @Classname: Development
 * @Version: 1.0
 */
public class Development implements Department{
    /**
     * 持有中介者的引用
     */
    private Mediator m;

    public Development(Mediator m) {
        this.m = m;
        m.register("development",this);
    }

    @Override
    public void selfAction() {
        System.out.println("转心科研，开发项目");
    }

    @Override
    public void outAction() {
        System.out.println("汇报工作，没钱了，需要支持");
        // 中介调用财务部门
        m.command("finacial");
    }
}
